'use strict';
var Dish = require('../models/DishModel');

module.exports = function (server) {

    /**
     * Display a list of the dishes.
     */
    server.get('/', function (req, res) {

        Dish.find(function (err, dishs) {
            if (err) {
                console.log(err);
            }

            var model =
            {
                dishes: dishs
            };
            res.render('index', model);

        });

    });

};